home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / AHDI / TTFHDX / DEFLST.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-09  |  1.9 KB  |  64 lines

  1. /* deflst.h */
  2.  
  3.  
  4. /* 22-Jan-88    ml    Started this.                    */
  5. /* 27-Jun-88    ml    Per John Hoenig, the sync field at end of each    */
  6. /*            sector for RLL format is made longer, and bytes */
  7. /*            per sector is reduced by 20 bytes.        */
  8. /* 14-Apr-89    ml    Modified to handle ST225R (for MEGAFILE 20).    */
  9.  
  10. /*
  11.  * Physical block address.
  12.  */
  13. #define    PADDR struct _paddr
  14. PADDR {
  15.     unsigned int exist;        /* TRUE: real entry */
  16.     unsigned int head;        /* head number */
  17.     unsigned int cylndr;    /* cylinder number */
  18.     unsigned int btoffst;    /* byte offset from index */
  19. };
  20.  
  21. /* Disk format */
  22. #define    MFM    0
  23. #define    RLL    1
  24.  
  25. /* Bytes per sector of disk (according to ADAPTEC manual) */
  26. #define BPSMFM  576        /* 17 sectors per track */
  27. #define BPSRLL  559        /* 26 sectors per track */
  28.  
  29. /* Bytes per track of disk */
  30. /* Per John Hoenig:
  31.  *    These numbers are number of bytes per revolution
  32.  * calculated at 3600 rpm.
  33.  * MFM :  (1000*1000/60) / 1.6  = 10417
  34.  * RLL :  ((1000*1000/60) / 1.6) * 1.5 = 15625
  35.  *
  36.  *    The ST225R originally has 31 sectors per track.  The firmware
  37.  * has been modified to make it look like it has 26 sectors per track.
  38.  * Bytes per sector for the ST225R is calculated at 3000 rpm.
  39.  * 3000rpm => 50Hz => 20000usec
  40.  * RLL (ST225R) :  (20000 / (8/7.5)) = 18750 (18742 to be conservative)
  41.  */
  42. #define BPTMFM     10417
  43. #define BPTRLL     15625
  44. #define BPT31RLL 18742
  45.  
  46. /* Duration of index pulse on each track */
  47. #define NDXPULS 150
  48.  
  49. /* Largest physical block address possible */
  50. PADDR maxpaddr;
  51.  
  52. /* Variables for disk format and tester */
  53. int fmt, tst;
  54.  
  55. /* error for defect entries */
  56. #define    EMPTY    (-7)    /* entry is empty */
  57. #define    INCMPL    (-8)    /* entry is incomplete */
  58. #define HD2BIG    (-9)    /* head number entered is too big */
  59. #define CYLNUM0    (-10)    /* cylinder number entered is too big */
  60. #define CYL2BIG    (-11)    /* cylinder number entered is too big */
  61. #define BYT2BIG    (-12)    /* byte offset entered is too big */
  62.  
  63.  
  64.